In camera implementation of selecting and stitching frames for panoramic imagery

ABSTRACT

A system, method, and computer program product for selecting qualifying frames from an image sequence for use in subsequent stitching into a composite panoramic image are disclosed. Incoming frames from any source may be cropped and downscaled prior to evaluation against qualifying criteria relating to image overlap and local motion. Qualifying images are saved and/or output. The resulting panoramic image generally uses fewer qualifying images and appears smoother and has fewer artifacts than those of the prior art. The qualifying criterion for image overlap is a predetermined overlap margin or percentage between a current image and a previous image from the sequence. The qualifying criterion for image motion includes a maximum amount of local motion, often due to passing objects. The embodiments may process incoming images in real time or from stored sequences. Problems may trigger user warnings.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit under 35 U.S.C. 119(e) of commonly-assigned U.S. provisional application Ser. No. 61/472,454, filed Apr. 6, 2011, and entitled “In Camera Implementation of Selecting and Stitching Frames for Panoramic Imagery”, which is hereby incorporated by reference. Commonly-assigned patent applications of related subject matter include U.S. Ser. No. 12/536,728, filed on Aug. 6, 2009, entitled “In-Camera Panorama Image Stitching Assistance”, published Feb. 11, 2010 as U.S. Patent Application Publication 2010/0033553A1, and U.S. Ser. No. 12/549,254, filed on Aug. 27, 2009, entitled “Robust Fast Panorama Stitching In Mobile Phones Or Cameras”, published Mar. 4, 2010 as U.S. Patent Application Publication 2010/0054628A1, each of which is also expressly incorporated by reference in its entirety.

FIELD OF THE INVENTION

This patent application relates in general to stitching a sequence of images from a digital camera together to create a single composite panoramic image, and more specifically to capturing the images to increase the likelihood of achieving a quality panoramic image.

BACKGROUND OF THE INVENTION

Panoramic or wide format photography captures a sequence of images that are reconstructed into a single image that takes the form of a wide strip with an elongated field of view. A panoramic image typically shows a field of view that is greater than that of a camera equipped with a wide angle lens. One way to capture a panoramic image is to mount a film camera on a tripod and take a succession of images of a scene as the camera is physically rotated. The images are subsequently “stitched” together by physically cutting and pasting together strips of exposed film where the boundaries between the edges of the film are carefully aligned.

Recently, the benefits of electronic photography have led to the general acceptance of digital cameras, that store captured images in a digital memory. Some digital cameras also provide a “panorama” feature that allows a user of the digital camera to capture a sequence of adjacent images that are subsequently digitally “stitched” together into a single image with a wide coverage of field. For example, some digital cameras with a panoramic feature can interface with a personal computer that provides software to externally join together two or more images at their edge boundaries to generate a single image with a wide panoramic format.

Two basic types of panoramic image assembly solutions for consumer-level cameras can be found in the market today. One is based on an “assist” application and the other is based on a sweep hand motion. In the assist based solution, the user is required to manually take the images after deciding, with the aid of an assistant application, that the proper overlap between images has been achieved. This flow leaves the decision of which pictures to capture for panorama image production to the user. For example, as described in commonly-assigned U.S. Patent Application Publication 2010/0033553, the existing solution for creating a panoramic image requires the user to take a few images with proper overlap (the user is guided by the camera with an assist application to take the pictures with the proper overlap) and then these images are stitched together into a panoramic image. This is a cumbersome process for the user and it might also result in failure to stitch the images for several reasons. First, the overlap between the images might not be within the required margins. Second, the scene may change while taking consecutive images; for example, lighting conditions may change, or object motion may be introduced.

Newer cameras in the market provide a feature where, for example, by pressing a button and sweeping the camera across the scene, images with proper overlap are captured automatically. Some cameras may capture images until the pressed button is released, or until a memory is full, or an overall image of predetermined size is captured, or a predetermined number of pictures are captured, or the sweep motion is ended, etc. A panoramic view is then created using the captured images. However, as shown by experimentation, this flow may produce unsatisfactory results when there is large local motion (e.g. passing cars, pedestrians, or animals) in the sequence of captured images. Some of the solutions that can be found in the market compose the panorama by stitching together narrow stripes from a large number of images from the capture sequence. A less desirable panoramic image having a stripe-like appearance sometimes results.

This patent application describes a solution to these challenges.

SUMMARY OF THE EMBODIMENTS

Systems, methods, and computer program products for selecting qualifying frames from an image sequence for use in subsequent stitching into a composite panoramic image are disclosed and claimed herein.

As described more fully below, the apparatus and processes of the embodiments disclosed permit production of improved panoramic images. Further aspects, objects, desirable features, and advantages of the apparatus and methods disclosed herein will be better understood and apparent to one skilled in the relevant art in view of the detailed description and drawings that follow, in which various embodiments are illustrated by way of example. It is to be expressly understood, however, that the drawings are for the purpose of illustration only and are not intended as a definition of the limits of the claimed invention.

Describing the present invention in terms of an exemplary method embodiment, at least some of the frames of an image sequence are chosen to be processed to select particular qualifying images to be used in production of a panoramic composite image. Frame overlap constraints are evaluated, and those frames meeting those constraints are also evaluated on frame motion constraints. Qualifying frames meeting all the constraints are selectively saved and outputted.

The method may operate in real time, and may process all the frames of an image sequence in order. The frames may be downscaled and cropped. The image sequence may be processed during image sequence capture or after image sequence capture. The image sequence may comprise any set of frames captured in succession, such as an uncompressed or compressed video sequence, and may be acquired by a digital camera during a pan of a target scene.

A count of frames required for production of a composite panoramic image may be specified. The frame overlap constraints may comprise a specified directional overlap percentage with respect to a previous qualifying frame. For example, the specified directional overlap percentage may be at least a forty percent horizontal overlap. The frame motion constraints comprise a maximum allowable local motion within a frame overlap region. The frame motion constraints may be evaluated by first performing motion estimation of a current frame with respect to a previous frame, then dividing overlapping frame regions into blocks, summing the number of pixels in each block wherein the difference in pixel illumination values for the current frame and the previous frame exceeds a predefined threshold, and finally selectively determining that large local motion violates the frame motion constraints according to the percentage of blocks having a high value for the pixels with high illumination value differences.

The first frame in the image sequence may be saved and outputted as a qualifying frame by default. Qualifying frames may be retained for further use as reference frames during further processing of the image sequence. The embodiments may stitch the qualifying frames into a composite panoramic image for output and storage.

Users may be warned if an error condition occurs, including for example if frame motion constraints are violated, frame overlap constraints are violated, excess camera tilt occurs in any orientation, or insufficient qualifying frames are saved. Frame motion constraint violations may include excess local motion, excess or insufficient panning speed, or excess hand motion drift in a perpendicular direction to the sweep direction.

In one embodiment, frame overlap constraints for at least two particular frames of the image sequence are evaluated against a predefined overlap margin, and local motion within the frames is evaluated for the at least two particular frames and at least one additional frame of the image sequence within the predefined overlap margin.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a diagram of overlapping image frames according to an embodiment;

FIG. 2 depicts a diagram of a system implementation according to an embodiment;

FIG. 3 depicts a diagram of a method implementation according to an embodiment.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Embodiments of the present invention require the photographer to sweep or pan the camera across the scene to be photographed. During this time, the camera captures what is essentially a video sequence, i.e. a set of periodically or approximately periodically captured image frames each spanning part of the scene. Individual chosen images of the sequence (i.e. at least some, but preferably all images are chosen) are then reviewed by an algorithm that checks to determine whether they comply with a set of requirements to ensure that the chosen images qualify to contribute to a good final panoramic image. The requirements are as follows: proper image overlap and no local motion. Each qualifying image in the video sequence that complies with those requirements is saved to memory, to be used later in the stitching stage. A log of the overlap of each qualifying image with the previous qualifying image is also kept. This data is useful in the stitching stage, where the qualifying images are combined seamlessly to create one panoramic image.

The stitching stage currently employed is described in commonly-assigned U.S. Patent Application Publication 2010/0054628, although the present invention is not limited to this particular stitching method. In this method, the transformation between every consecutive pair of images needs to be found. The log kept of the image overlap is used as an initial hint for this transformation.

The embodiments of the present invention offer an automatic real-time decision process that checks each chosen incoming frame to determine whether it is suitable for use in the final panoramic image. This process may be used with any camera or other imaging device. A subsequent stitching stage concatenates the qualifying images (or portions thereof) together to create the panoramic image.

By using significantly fewer images to create the panoramic image than in some prior art references, there is a significant reduction in “stripiness” of the panoramic image, so it appears to be smoother and of higher output quality. Furthermore, the embodiments enable a more reliable and accessible operation of the commonly-assigned panoramic image production methods.

This patent application thus describes a methodology for choosing the most suitable frames, from a stream of video frames arriving sequentially, for creating a panoramic image. At the end of the process, several overlapping images that include no local motion or only minimal local motion are saved. Each chosen captured image is downscaled and registered against the previous chosen image. It is also analyzed for local motion in the frame by comparing the current image to the previous chosen image. If the image is within the required overlap range with the previous chosen image and the local motion is small, it is saved for further processing; otherwise, it is discarded. Local motion is only important in overlapping areas, so in an alternate embodiment overlapping area local motion serves as a criterion for image qualification, along with proper overlap range.

Referring now to FIG. 1, two chosen image frames 100 and 110 are shown. These image frames have an overlapping region 120. In this exemplary figure, the panorama is shown with a horizontal orientation, but the invention is not limited to any particular orientation or direction.

Referring now to FIG. 2, a system diagram is provided that depicts the basics of the embodiments of the present invention that operate on chosen incoming video frames and output related keep/discard decisions and kept qualifying frames. A capture engine 210 receives at each cycle one image 250 as an input, typically from an imaging device such as a digital camera. For each input frame, the capture engine 210 downscales an image, and saves both the image and its downscaled version 260 to memory 240. The downscaled image 260 is fed into a motion estimation engine 220 that evaluates the motion vectors 270 of the image, using a reference image from the memory 240. A decision engine 230, estimates whether the frame overlap is within the required overlap margins and whether the local motion is small enough, and responsively makes a choice whether the current image should be saved as qualifying for the panoramic image or should be discarded. If it is kept, it may become the reference frame for the consecutive frames. The data regarding the resulting overlap between the current image and the previous saved image is passed to the stitching phase, where this data is helpful for determining placement of the qualifying images in the panoramic image.

The decision process performed by the decision engine 230 uses the following two basic rules: (a) if the overlap with the last chosen frame is between the required margins, check for local motion (compared with the previous chosen frame) in the overlap area, and, (b) if the local motion is low, keep the frame as it qualifies for panoramic stitching. Alternate embodiments may also “hold” frames meeting the frame overlap requirements but not the local motion requirements as candidate frames for use in panoramic stitching if no subsequent fully-qualifying candidate frames are captured. The “held” frames may be discarded if a subsequent frame is captured that meets all the qualifying requirements.

Qualifying frames are retained for further use as reference frames; otherwise, the process may discard the non-qualifying current frame and checks the next chosen frame to be processed, which is preferably the next frame in the image sequence. This automated process uses significant portions of a captured image, according to a minimum threshold value, and thereby reduces the number of stitches required to generate a full panoramic image. Also, a higher quality panoramic image is achieved by avoiding the need for the user to provide guidance in capturing the sequence of images. Hence the embodiments of the present invention overcome several deficiencies of the prior art described above, e.g. image quality reduction due to use of a large number of stitches is avoided, complexity of use is greatly reduced, stitching related failures caused by insufficient alignment are greatly reduced, and the effects of local motion within the panoramic image are substantially eliminated.

Following is a description of the overall methodology used in the embodiments of the present invention. Streaming video input may arrive at any rate, generally higher than 10 frames per second, typically 30 frames per second, and at any resolution. The algorithm may be configured with the following parameters:

1. The part of the incoming picture to be used—the incoming pictures may be used as a whole or may be cropped to a smaller size.

2. The amount of desired overlap between two images in the panoramic image.

3. The number of images that will comprise the panoramic image.

For example, in an embodiment of the invention one may decide to use only the middle portion of every frame (that may be 50% of the entire frame), with an overlap of 50% between the chosen half-frames. In this example, the required total overlap of a frame with a previous chosen frame is thus 75%. Therefore, using the aforementioned exemplary values, if a 1280×720 pixel video stream is used, once the current frame is shifted 1280×0.25=320 pixels horizontally with respect to a previous chosen frame, the current frame is saved. This saved frame may now become the reference chosen frame. In another embodiment, and not by way of limitation, one can require 25% overlap between the half-frames, and then the required overlap between chosen frames is 37.5%. The embodiments, with these exemplary settings, overcome the significant problem of local motion seen in prior art panoramic image solutions.

Referring now to FIG. 3, in order to identify the frame with correct overlap with respect to the previous chosen frame, the following steps are performed preferably but not necessarily for each incoming frame:

In step 310 the frame is downscaled for motion estimation. This allows finding a large movement along the motion axis (X in case of horizontal motion, and Y in case of vertical motion) with shorter computation time.

In step 320, motion estimation (ME) with respect to the previous chosen frame is then performed. In order to avoid accumulation of ME errors, the ME is performed with respect to the previous chosen frame (rather than the immediately previous frame in the video stream, necessarily) with an initial prediction of the motion. So, the embodiments only find and correct the error in the prediction. The prediction of the motion of the current frame is calculated as the motion of the immediately previous frame with respect to the previous chosen frame, with an addition of a motion prediction of the step from the immediately previous frame to the current frame. The predicted motion is assumed to be the same as the motion between the two previous frames.

In step 330, after the error in the prediction is calculated, this value is added to the prediction, to produce the correct motion of the current frame with respect to the previous chosen frame.

In step 340, the output of the ME prediction is a few hundreds of motion vectors (MVs). The robust MVs are chosen from this pool. Then a 2D histogram of these MVs is created. A single MV is chosen for each frame as the one that corresponds to the largest bin in the histogram. Additional rules are applied to this MV, such as, if a few MVs with similar directions have very high histogram values, then a single MV is calculated as a weighted sum of these.

In step 350, in case of horizontal motion, the only component typically of interest is the X component of the MV (the Y component is used as an indicator of an unwanted perpendicular drift, which is used to warn the user to correct the user's hand motion). The X motion indicates when a frame has been reached that has the desired overlap with a previous chosen frame.

In step 360, if the required overlap margins have been reached, the frame is tested for local motion. By using the difference between the calculated MVs of the current and the previous frames, their overlapping regions are found and registered. The images are divided to corresponding blocks for analysis, and in each block the illumination values of the two images are subtracted, and the number of pixels in each block with a difference in pixel illumination value for the two images exceeding a predefined threshold are summed. If a large percentage of the blocks have a high value for the number of pixels with high illumination value differences, it is assumed that the frame contains large local motion. Such a frame is then preferably discarded and processing continues with the next frame (i.e., with step 310, using the next frame). Otherwise execution of the algorithm continues with step 370 described below. An exception to this phase occurs if the far end of the overlap margins has been reached. In this case, the current frame is used for further processing despite local motion. Subsequently the processing continues with step 310, using the next frame.

In step 370, if the frame complies with the requirements, the frame is saved for further processing. The reference frame is replaced by this frame and processing continues with step 310, using the next frame.

Execution of this algorithm is repeated until the entire panoramic view is captured as may be desired by the user of the capture device. The photographer may be warned if problems occur, for example, if frame motion constraints are violated, frame overlap constraints are violated, excess camera tilt occurs in any orientation, and/or insufficient qualifying frames are saved. The frame motion constraints may be violated by, for example, excess local motion, excess or insufficient panning speed, and/or excess hand motion drift in a perpendicular direction to the sweep direction. Appropriate user messages may be generated as a result of such problems.

One possible alternative is to try and cope with local motion in the frames in the stitching stage (i.e. local motion in the overlap area between pictures will introduce a visual artifact to the final result). In the stitching stage it is possible to attempt to stitch the two overlapped images in places that do not include significant local motion. However, experiments have shown that the resulting panorama in this case might still have some stitching artifacts.

Another alternative method is to simply save the whole video sequence, if enough memory resources are available, and then choose the best frames for the panorama later. In this case, one may effectively move back and forth in time, and the best frames will be chosen but not based only on prior frames. Warning the photographer of problems may not be feasible in such an embodiment, versus embodiments of real-time image evaluation.

As used herein, the terms “a” or “an” shall mean one or more than one. The term “plurality” shall mean two or more than two. The term “another” is defined as a second or more. The terms “including” and/or “having” are open ended (e.g., comprising). Reference throughout this document to “one embodiment”, “certain embodiments”, “an embodiment” or similar term means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of such phrases in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner on one or more embodiments without limitation. The term “or” as used herein is to be interpreted as inclusive or meaning any one or any combination. Therefore, “A, B or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B and C”. An exception to this definition will occur only when a combination of elements, functions, steps or acts are in some way inherently mutually exclusive.

In accordance with the practices of persons skilled in the art of computer programming, embodiments are described below with reference to operations that are performed by a computer system or a like electronic system. Such operations are sometimes referred to as being computer-executed. It will be appreciated that operations that are symbolically represented include the manipulation by a processor, such as a central processing unit, of electrical signals representing data bits and the maintenance of data bits at memory locations, such as in system memory, as well as other processing of signals. The memory locations where data bits are maintained are physical locations that have particular electrical, magnetic, optical, or organic properties corresponding to the data bits.

When implemented in software, the elements of the embodiments are essentially the code segments to perform the necessary tasks. The non-transitory code segments may be stored in a processor readable medium or computer readable medium, which may include any medium that may store or transfer information. Examples of such media include an electronic circuit, a semiconductor memory device, a read-only memory (ROM), a flash memory or other non-volatile memory, a floppy diskette, a CD-ROM, an optical disk, a hard disk, a fiber optic medium, etc. User input may include any combination of a keyboard, mouse, touch screen, voice command input, etc. User input may similarly be used to direct a browser application executing on a user's computing device to one or more network resources, such as web pages, from which computing resources may be accessed. Embodiments may also encompass integrated circuitry including circuit elements capable of performing specific system operations.

While the invention has been described in connection with specific examples and various embodiments, it should be readily understood by those skilled in the art that many modifications and adaptations of the invention described herein are possible without departure from the spirit and scope of the invention as claimed hereinafter. Thus, it is to be clearly understood that this application is made only by way of example and not as a limitation on the scope of the invention claimed below. The description is intended to cover any variations, uses or adaptation of the invention following, in general, the principles of the invention, and including such departures from the present disclosure as come within the known and customary practice within the art to which the invention pertains. 

1-25. (canceled)
 26. A method of selecting frames of an image sequence for panoramic stitching, comprising: evaluating frame overlap constraints between a current frame and a previously selected frame of the image sequence; evaluating frame motion constraints between the current and previously selected frames, the evaluating of the frame motion constraints comprising determining whether local motion in an overlapping region between the current and previously selected frames exceeds a threshold; and selecting the current frame for panoramic stitching in response to the frame overlap constraints and the frame motion constraints being met.
 27. The method of claim 26, wherein the frame overlap constraints comprise a specified directional overlap percentage with respect to the previously selected frame.
 28. The method of claim 26, wherein evaluating the frame motion constraints are comprises: performing motion estimation of the current frame with respect to the previously selected frame; dividing the overlapping region between the current frame and the previously selected frame into blocks for subsequent analysis; summing the number of pixels in each block having a difference in pixel illumination value for the current frame and the previously selected frame exceeding a predefined threshold; and selectively determining that large local motion violates the frame motion constraints according to the percentage of blocks having pixel sums indicating high illumination value differences.
 29. The method of claim 26, further comprising downscaling the frames to be processed.
 30. The method of claim 26, further comprising warning a user if an error condition occurs, the error condition including at least one of: the frame motion constraints being violated, the frame overlap constraints being violated, excess camera tilt occurring in any orientation, and insufficient qualifying frames being saved.
 31. The method of claim 30, wherein the frame motion constraints are violated by at least one of: excess local motion, excess panning speed, insufficient panning speed, and excess hand motion drift in a direction perpendicular to a sweep direction.
 32. The method of claim 26, wherein the frame overlap constraints for the current and previously selected frames are evaluated against a predefined overlap margin and the frame motion constraints are evaluated for the current and previously selected frames and at least one additional frame of the image sequence within the predefined overlap margin.
 33. The method of claim 26, wherein evaluating the frame motion constraints comprises generating a histogram comprising a plurality of motion vectors for the current frame with respect to the previously selected frame, wherein a motion vector corresponding to the largest bin the in the histogram is employed in determining if the frame overlap constraints and the frame motion constraints are met.
 34. A device for selecting frames of an image sequence for panoramic stitching, comprising: an input interface configured to receive the image sequence; a memory configured to store the image sequence; and a processor operatively coupled to the memory and the input interface and configured to: evaluate frame overlap constraints between a current frame and a previously selected frame of the image sequence; evaluate frame motion constraints between the current and previously selected frames, the evaluation of the frame motion constraints comprising determining whether local motion in an overlapping region between the current and previously selected frames exceeds a threshold; and select the current frame for panoramic stitching in response to the frame overlap constraints and the frame motion constraints being met.
 35. The device of claim 34, wherein the frame overlap constraints comprise a specified directional overlap percentage with respect to the previously selected frame.
 36. The device of claim 34, wherein the processor is further configured to evaluate the frame motion constraints via: performing motion estimation of the current frame with respect to the previously selected frame; dividing the overlapping region between the current frame and the previously selected frame into blocks for subsequent analysis; summing the number of pixels in each block having a difference in pixel illumination value for the current frame and the previously selected frame exceeding a predefined threshold; and selectively determining that large local motion violates the frame motion constraints according to the percentage of blocks having pixel sums indicating high illumination value differences.
 37. The device of claim 34, wherein the processor is further configured to warn a user if an error condition occurs, the error condition including at least one of: the frame motion constraints being violated, the frame overlap constraints being violated, excess camera tilt occurring in any orientation, and insufficient qualifying frames being saved.
 38. The device of claim 34, wherein the processor is further configured to: i) evaluate the frame overlap constraints for the current and previously selected frames against a predefined overlap margin and ii) evaluate the frame motion constraints for the current and previously selected frames and at least one additional frame of the image sequence within the predefined overlap margin.
 39. The device of claim 34, wherein the processor is further configured to: i) evaluate the frame motion constraints based on generating a histogram comprising a plurality of motion vectors for the current frame with respect to the previously selected frame and ii) determine if the frame overlap constraints and the frame motion constraints are met based on a motion vector corresponding to the largest bin the in the histogram.
 40. A non-transitory computer readable medium having stored thereon instructions that, when executed, cause a processor of a device to: evaluate frame overlap constraints between a current frame and a previously selected frame; evaluate frame motion constraints between the current and previously selected frames, the evaluation of the frame motion constraints comprising determining whether local motion in an overlapping region between the current and previously selected frames exceeds a threshold; and select the current frame for panoramic stitching in response to the frame overlap constraints and the frame motion constraints being met.
 41. The non-transitory computer readable medium of claim 40, wherein the frame overlap constraints comprise a specified directional overlap percentage with respect to the previously selected frame.
 42. The non-transitory computer readable medium of claim 40, further having stored thereon instructions that, when executed, cause the processor to evaluate the frame motion constraints via: performing motion estimation of the current frame with respect to the previously selected frame; dividing the overlapping region between the current frame and the previously selected frame into blocks for subsequent analysis; summing the number of pixels in each block having a difference in pixel illumination value for the current frame and the previously selected frame exceeding a predefined threshold; and selectively determining that large local motion violates the frame motion constraints according to the percentage of blocks having pixel sums indicating high illumination value differences.
 43. The non-transitory computer readable medium of claim 40, further having stored thereon instructions that, when executed, cause the processor to warn a user if an error condition occurs, the error condition including at least one of: the frame motion constraints being violated, the frame overlap constraints being violated, excess camera tilt occurring in any orientation, and insufficient qualifying frames being saved.
 44. The non-transitory computer readable medium of claim 40, further having stored thereon instructions that, when executed, cause the processor to: evaluate the frame overlap constraints for the current and previously selected frames against a predefined overlap margin; and evaluate the frame motion constraints for the current and previously selected frames and at least one additional frame of the image sequence within the predefined overlap margin.
 45. The non-transitory computer readable medium of claim 40, further having stored thereon instructions that, when executed, cause the processor to: evaluate the frame motion constraints via generating a histogram comprising a plurality of motion vectors for the current frame with respect to the previously selected frame; and employ a motion vector corresponding to the largest bin the in the histogram in determining if the frame overlap constraints and the frame motion constraints are met. 